@echo off
chcp 65001 >nul
echo 🚀 启动脑肿瘤AI诊断系统
echo ================================

@REM echo.
@REM echo 📦 安装Python依赖...
@REM pip install -r requirements.txt

echo.
echo 🔧 启动后端服务器...
start "Brain Tumor Backend" cmd /k "cd /d %~dp0 && .\.venv\Scripts\python.exe brain-tumor-visualization\server\app.py"

echo.
echo ⏳ 等待后端启动...
timeout /t 5 /nobreak > nul

echo.
echo 🌐 启动前端开发服务器...
cd brain-tumor-visualization/client
start "Brain Tumor Frontend" cmd /k "npm start"

echo.
echo ✅ 系统启动完成！
echo.
echo 📱 前端地址: http://localhost:3000
echo 🔧 后端地址: http://localhost:5000
echo.
echo 按任意键运行API测试...
pause > nul

echo.
echo 🧪 运行API测试...
cd /d %~dp0
python test_api.py

echo.
echo 按任意键退出...
pause > nul
